<script setup>
import { useTodoStore } from '../store/todos';

const todos = useTodoStore()
</script>

<template>
  <footer class="footer">
    <span class="todo-count"><strong>{{todos.leftCount}}</strong> item left</span>
    <ul class="filters">
      <li v-for="item in todos.filter" :key="item">
        <a :class="{selected : item === todos.active}" href="#/" @click="todos.changeActive(item)">{{item}}</a>
      </li>
    </ul>
    <button class="clear-completed" @click="todos.clearComplete">Clear completed</button>
  </footer>
</template>

<style lang="less" scoped></style>
